//
//  __theme.swift
//  eemall
//
//  Created by zhuxietong on 2018/8/27.
//  Copyright © 2018年 zhuxietong. All rights reserved.
//

import Foundation
import soapp
//
//extension UIImage
//{
//    @objc public static var goods_holder:UIImage{
//        get{
//            return  UIImage.image(UIColor(shex: "#f1f1f1"), size: [100,100])
//        }
//    }
//}
//

extension UIImage
{
    @objc public static var goods_holder:UIImage{
        get{
            return  UIImage.image(UIColor(shex: "#e1e1e1"))
        }
    }
}

public class ___shop {
//    public static var hex1 = "#E42154"
//    public static var hex2 = "#FF8737"
    public static var tint = UIColor.color(light: "#D32A4A", dark: "#D32A4A")
    public static var priceColor = UIColor.color(light: "#D32A4A", dark: "#D32A4A")

    public static var second = UIColor._tint

    public static var top_nav:EeTopStyle{
        get{
            var style = EeTopStyle()
            style.navTintColor = UIColor(shex:"#fff")
            style.navBarBgAlpha = 1
            style.navBarBgStyle = .color(._tint)
            style.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor._tint,NSAttributedString.Key.font:UIFont.systemFont(ofSize: 18)]
            //        style.navBarShadow = .color(UIColor(white: 0.3, alpha: 0.5))
            style.statusBarStyle = .lightContent
            
            style.navBarShadow = .none
            return style
        }
    }
}
//
//public class __theme {
//    static func light()->EeTopStyle{
//        var style = EeTopStyle()
//
//        style.navTintColor = UIColor(shex:"#fff")
//        style.statusBarStyle = .lightContent
//        style.navBarBgAlpha = 1
//        style.navBarBgStyle = .color(._tint)
//        style.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor(shex:"#fff"),NSAttributedString.Key.font:UIFont.systemFont(ofSize: 16)]
//        //        style.navBarShadow = .color(UIColor(white: 0.3, alpha: 0.5))
//        style.navBarShadow = .none
//        return style
//    }
//
//    public static func white()->EeTopStyle
//    {
//        var style = EeTopStyle()
//        style.navTintColor = UIColor(shex:"#333")
//        style.statusBarStyle = .default
//        style.navBarBgAlpha = 1
//        style.navBarBgStyle = .color(UIColor.white)
//        style.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor(shex:"#333"),NSAttributedString.Key.font:UIFont.systemFont(ofSize: 16)]
//        style.navBarShadow = .color(UIColor(white: 0.6, alpha: 0.3))
//        //        style.navBarShadow = .none
//
//
//
//        FieldCell.padding_top = 16
//        FieldCell.padding_bottom = 16
//        FieldCell.padding_left = AppTheme.edge
//        FieldCell.padding_right = AppTheme.edge - 10
//        FieldCell.name_width = 70
//
//        FK.indicator_more_img = "f_more_indicator"
//
//
//
//        FieldView.holderStyle.font = UIFont.systemFont(ofSize: 13)
//        FieldView.valueStyle.font = UIFont.systemFont(ofSize: 13)
//        FieldView.valueStyle.color = UIColor(shex:"#111")
//
//
//        UIColor.separator_hex = "#ccca"
//        UIColor.table_bg_hex = "#E2E2E2"
//
//        //        let backImageInsets = UIEdgeInsetsMake(0, 0, 0, 0)
//        //        let indicatorImg = UIImage(named:"nav_f_back")?.rt_tintedImage(with: UIColor(shex:"#333"))
//        //        let bck = indicatorImg?.withRenderingMode(.alwaysOriginal).withAlignmentRectInsets(backImageInsets)
//        //        UINavigationBar.appearance().backIndicatorImage = bck
//        //        UINavigationBar.appearance().backItem?.backBarButtonItem?.setTitlePositionAdjustment(UIOffset(horizontal: 0, vertical: 0), for: .default)
//        //        UINavigationBar.appearance().backIndicatorTransitionMaskImage = bck
//
//        //        let backImageInsets = UIEdgeInsetsMake(0, 0, 0, 0)
//        //        let indicatorImg = UIImage(named:"nav_f_back")?.rt_tintedImage(with: UIColor(shex:"#333"))
//        //        let bck = indicatorImg?.withRenderingMode(.alwaysOriginal).withAlignmentRectInsets(backImageInsets)
//
//
//        UINavigationBar.appearance().backIndicatorImage = UIImage(named:"back-indicator")
//        UINavigationBar.appearance().backItem?.backBarButtonItem?.setTitlePositionAdjustment(UIOffset(horizontal: -8, vertical: 0), for: .default)
//        UINavigationBar.appearance().backIndicatorTransitionMaskImage = UIImage.image(.clear, size: [0.1,0.1])
//
//        AppTheme.nav_back_img = UIImage(named:"back-indicator")
//
//
//
//        //       UIBarButtonItem.appearance().setTitleTextAttributes(<#T##attributes: [NSAttributedStringKey : Any]?##[NSAttributedStringKey : Any]?#>, for: .normal)
//        UIBarButtonItem.appearance().setTitleTextAttributes([NSAttributedString.Key.foregroundColor:UIColor(shex:"#333"),NSAttributedString.Key.font:UIFont.systemFont(ofSize: 17)], for: .normal)
//        return style
//    }
//
//}
//
//
//
//
//
//
//extension UIImage{
//    convenience init?(snamed:String) {
////        let path = Bundle(for: GoodsDetailCtr.self).path(forResource: "eemall", ofType: "bundle")
////        let path = Bundle.main.path(forResource: "eemall", ofType: "bundle")
//////        path(forResource: "eemall", ofType: "bundle")
////        let p = Bundle(path: path!)
//        self.init(named: snamed, in: Bundle(for: GoodsDetailCtr.self), compatibleWith: nil)
//    }
//}
